import os

Import('pmallocLibrary')
Import('mcoreLibrary')
Import('mtmLibrary')
Import('benchEnv')


benchEnv['CPPPATH'] = ['#library/mcore/include', '#library/mtm/include', '#library/pmalloc/include']
benchEnv.Append(CCFLAGS = ' -fgnu-tm -fPIC ')

benchEnv.Append(CCFLAGS = ' -m64 ')
benchEnv.Append(LINKFLAGS = ' -T '+ benchEnv['MY_LINKER_DIR'] + '/linker_script_persistent_segment_m64')
Export('benchEnv')

if benchEnv['BUILD_BENCH'] == 'ALL':
	bench_list = Split("""
			   memcached
			   stamp-kozy 
	                   """)
else:
	bench_list = benchEnv['BUILD_BENCH'].split(',')

for bench in bench_list:
	sconscript_path = bench + '/SConscript'
	SConscript(sconscript_path)
